package org.android.cosmus.indiam.activities;

import org.android.cosmus.indiam.R;
import org.android.cosmus.indiam.tasks.CheckConnectionTask;
import org.android.cosmus.indiam.tasks.LoginTask;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class LoginActivity extends Activity
{
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    new CheckConnectionTask(this).execute();
    setContentView(R.layout.login);
  }
  
  public void doLogin(View view)
  {
    TextView email = (TextView)findViewById(R.id.email_field);
    TextView password = (TextView)findViewById(R.id.password_field);
    new LoginTask(this).execute(email.getText().toString(), password.getText().toString());
  }
}
